contentType

open fun contentType(contentType: String): File.Builder

Sets the file content type.

Please note, when the file value is specified using a path, the content type may be omitted. In such cases, Chromium will automatically determine the content type based on the file extension. If no MIME type is associated with the extension, the content type defaults to application/octet-stream.

For files provided as byte arrays, the content type is always passed as-is. It will not be determined automatically if it is empty.

Return

this builder

Parameters

contentType

the file content type determined by the file extension